import {useUserStore} from "@/store/sys/user.js";

export default {
    mounted(el, binding, vnode, prevVNode) {
        const userStore = useUserStore()
        const roles = userStore.getRoles;
        if (roles.indexOf('*') > -1) {
            return
        }
        const permission = binding.value;
        if (roles.indexOf(permission) === -1) {
            el.remove()
        }
    },
}